/*package ed.hbut.supermarket1.exception;


import ed.hbut.supermarket1.entity.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.sql.SQLIntegrityConstraintViolationException;

@Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(SQLIntegrityConstraintViolationException.class)
    public Result handleException(SQLIntegrityConstraintViolationException e) {


        System.out.println("失败了");
        log.error(e.getMessage());
        return Result.error("操作失败");

    }

}*/
